package com.jhopesoft.framework.dao.entity.workflow;
// default package
// Generated 2017-8-11 19:00:58 by Hibernate Tools 5.2.0.Beta1


import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

/**
 * FWorkflowgroup generated by hbm2java
 */
@Entity
@SuppressWarnings("serial")
@DynamicUpdate
@Table(name = "f_workflowgroup")
public class FWorkflowgroup implements java.io.Serializable {


  private String groupid;
  private FWorkflowgroup FWorkflowgroup;
  private String groupname;
  private int orderno;
  private Set<FWorkflowgroup> FWorkflowgroups = new HashSet<FWorkflowgroup>(0);
  private Set<FWorkflowdesign> FWorkflowdesigns = new HashSet<FWorkflowdesign>(0);

  public FWorkflowgroup() {}


  public FWorkflowgroup(String groupid, String groupname, int orderno) {
    this.groupid = groupid;
    this.groupname = groupname;
    this.orderno = orderno;
  }

  public FWorkflowgroup(String groupid, FWorkflowgroup FWorkflowgroup, String groupname, int orderno,
      Set<FWorkflowgroup> FWorkflowgroups, Set<FWorkflowdesign> FWorkflowdesigns) {
    this.groupid = groupid;
    this.FWorkflowgroup = FWorkflowgroup;
    this.groupname = groupname;
    this.orderno = orderno;
    this.FWorkflowgroups = FWorkflowgroups;
    this.FWorkflowdesigns = FWorkflowdesigns;
  }

  @Id
  @GeneratedValue(generator = "generator")
  @GenericGenerator(name = "generator", strategy = "uuid.hex")
  @Column(name = "groupid", unique = true, nullable = false, length = 40)
  public String getGroupid() {
    return this.groupid;
  }

  public void setGroupid(String groupid) {
    this.groupid = groupid;
  }

  @ManyToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "parentid")
  public FWorkflowgroup getFWorkflowgroup() {
    return this.FWorkflowgroup;
  }

  public void setFWorkflowgroup(FWorkflowgroup FWorkflowgroup) {
    this.FWorkflowgroup = FWorkflowgroup;
  }


  @Column(name = "groupname", nullable = false, length = 100)
  public String getGroupname() {
    return this.groupname;
  }

  public void setGroupname(String groupname) {
    this.groupname = groupname;
  }


  @Column(name = "orderno", nullable = false)
  public int getOrderno() {
    return this.orderno;
  }

  public void setOrderno(int orderno) {
    this.orderno = orderno;
  }

  @OneToMany(fetch = FetchType.LAZY, mappedBy = "FWorkflowgroup")
  @OrderBy("orderno")
  public Set<FWorkflowgroup> getFWorkflowgroups() {
    return this.FWorkflowgroups;
  }

  public void setFWorkflowgroups(Set<FWorkflowgroup> FWorkflowgroups) {
    this.FWorkflowgroups = FWorkflowgroups;
  }

  @OneToMany(fetch = FetchType.LAZY, mappedBy = "FWorkflowgroup")
  public Set<FWorkflowdesign> getFWorkflowdesigns() {
    return this.FWorkflowdesigns;
  }

  public void setFWorkflowdesigns(Set<FWorkflowdesign> FWorkflowdesigns) {
    this.FWorkflowdesigns = FWorkflowdesigns;
  }



}


